using ResxHelper.Object;

namespace ResxHelper.Logic.Writers
{
    public class ResourceFileFormatterFactory
    {
        public static IResourceFileFormatter GetFormatter(ResourceFile file, SaveFileType output)
        {
            IResourceFileFormatter formatter = null;
            switch (output)
            {
                case SaveFileType.CsvString:
                    formatter = new ResourceFileCsvFormatter(file);
                    break;
                case SaveFileType.ResourceFile:
                    formatter = new ResourceFileResxFormatter(file);
                    break;
                case SaveFileType.Excel:
                    formatter = new ResourceFileExcelFormatter(file);
                    break;
                case SaveFileType.AndroidResource:
                    formatter = new ResourceFileAndroidFormatter(file);
                    break;
                case SaveFileType.IOSResource:
                    formatter = new ResourceFileIOSFormatter(file);
                    break;
            }

            return formatter;
        }
    }
}
